<script type="text/javascript" src="<?php echo site_url();?>addons/themes/ranking/js/helper.js"> </script>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=true"></script>


<?php echo form_open('admin/dataman/content_update',$attributes = 'method="post" name="edit" id="edit"');?>

<h3><?php echo lang('dataman.content'); ?></h3>

<div id="action"><?php //$this->load->view('admin/partials/buttons', array('buttons' => array('save'))); ?></div>

	<table border="0" class="table-list">
	
		<tbody>
			<thead>
				<th><?php echo lang('dataman.field')?></th>
				<th><?php echo lang('dataman.value')?></th>
			</thead>
			<tr>
				<td><?php echo form_label( lang('dataman.content.name') ); ?></td>
				<td>
					<input type="text" id="name_item" required="required" name="name_item" 
					value=""  maxlength="200" size="70" />
					
					<div class="hidden error" id="check_duplicate_name_error">
				 		<?php echo lang('ranking.check.duplicate.name.error')?>
					 </div>  
				</td>
			</tr>
			<tr>
				<td><?php echo form_label( lang('dataman.content.dish_name') ); ?></td>
				<td>
					<input type="text" id="dish_name" name="dish_name" 
					value=""  maxlength="200" size="70" />
				</td>
			</tr>
			<tr>
				<td><?php echo form_label( lang('dataman.content.form.address') ); ?></td>
				<td>&nbsp;</td>
			</tr>
			
			<tr>
				<td><?php echo '-&nbsp;&nbsp;&nbsp;'.form_label( lang('dataman.content.form.state') ); ?></td>
				<td><?php echo $region;?></td>
			</tr>
			<tr>
				<td><?php echo '-&nbsp;&nbsp;&nbsp;'.form_label( lang('ranking.select.cities') ); ?></td>
				<td><div id="city_"><?php echo $city;?></div></td>
			</tr>
			<tr>
				<td><?php echo '-&nbsp;&nbsp;&nbsp;'.form_label( lang('dataman.content.form.details') ); ?></td>
				<td>
					<input type="text" id="details" name="details" size="53" maxlength="250"
							value="" />
				</td>
			</tr>
			
			<tr>
				<td>&nbsp;&nbsp;</td>
				<td><div id="google_map_add_form"></div></td>
			</tr>
			
			<tr>
				<td><?php echo form_label( lang('dataman.content.form.url') ); ?></td>
				<td>
					<input type="text" name="user_url" id="user_url"
					value="" maxlength="250" size="70" />
				</td>
			</tr>
			
			<tr>
				<td><?php echo form_label( lang('dataman.content.form.image') ); ?></td>
				<td>
					<table> 
						<tr>
							<td>
								<div id="image-show-1">
									<div id="preview_1"></div>
									<br/>
									 
									<input type="checkbox" name="image_selected1" id="image_selected1" rel="select_image"
										value="1" onclick="select_image(this,'image_selected1')" /> 
										<?php echo lang('dataman.content.form.select')?>	
								</div>
					 		</td>
						
					 		<td>
								<div id="image-show-2">
									<div id="preview_2"></div>
									<br/>
									 
									<input type="checkbox" name="image_selected2" id="image_selected2" rel="select_image"
										value="1" onclick="select_image(this,'image_selected2')" />
										<?php echo lang('dataman.content.form.select')?>	 
								</div>
						 	</td>
						
						 	<td>
								<div id="image-show-3">
									<div id="preview_3"></div>
									<br/>
									
									<input type="checkbox" name="image_selected3" id="image_selected3" rel="select_image"
											value="1" onclick="select_image(this,'image_selected3')" /> 
									<?php echo lang('dataman.content.form.select')?>	
								</div>
							</td>
							
					 	</tr>
						<tr>
							<td colspan="3">
								 <div class="hidden" id="selected_image_err">
									<?php echo lang('ranking.add.form.select.image.error')?>
								 </div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			
	<!--	<tr>
				<td><?php echo form_label( lang('dataman.content.form.googleImage') ); ?></td>
				<td><?php echo form_input('googleImage','','maxlength="100" size="50" id="googleImage"'); ?></td>
			</tr>
	-->		
			<tr>
				<td><?php echo form_label( lang('dataman.content.form.image') ); ?></td>
				<td>
					<input type="file" id="image1" name="image1" size="65"
						onchange="fileUpload(this.form,'iF_proc_image_preview/1','image_upload_stt1','preview_1','upload_iframe1');" />
					<br/>
					<div id="image_upload_stt1">
						<div class="hidden">
					 		<?php echo lang('ranking.upload.image_1.error')?>
					    </div>
					</div>
				</td>
			</tr>
			<tr>
				<td><?php echo form_label( lang('dataman.content.form.image') ); ?></td>
				<td>
					<input type="file" id="image2" name="image2" size="65" 
						onchange="fileUpload(this.form,'iF_proc_image_preview/2','image_upload_stt2','preview_2','upload_iframe2');" />
						<br/>
						<div id="image_upload_stt2">
							<div class="hidden">
						 		<?php echo lang('ranking.upload.image_2.error')?>
						    </div>
						</div>
				</td>
			</tr>
			<tr>
				<td><?php echo form_label( lang('dataman.content.form.image') ); ?></td>
				<td>
					<input type="file" id="image3" name="image3" size="65" 
						onchange="fileUpload(this.form,'iF_proc_image_preview/3','image_upload_stt3','preview_3','upload_iframe3');" />
						<br/>
						<div id="image_upload_stt3">
							<div class="hidden">
						 		<?php echo lang('ranking.upload.image_3.error')?>
						    </div>
						</div>
				</td>
			</tr>
			<tr>
				<td><?php echo lang('dataman.content.form.else')?></td>
				<td>
					<textarea cols="60" rows="5" id="elsewhat" name="elsewhat" maxlength="1000" ></textarea>
				</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td>
					<input type="button" value="<?php echo lang('dataman.content.form.ok');?>" onclick="submit_form_add_item();" />
					&nbsp;&nbsp;&nbsp;
					<input type="button" value="<?php echo lang('dataman.content.form.cancel');?>" onclick="window.location=BASE_URI+'admin/dataman/content'" />
				</td>
			</tr>
			
			<input type="hidden" name="post_user_id" id="post_user_id" value="1" />
			<input type="hidden" name="item_id" id="item_id" value="0" />
			 
			<input type="hidden" name="lat" id="lat" value="36" />
			<input type="hidden" name="long" id="long" value="138" />
			
			<input type="hidden" name="image_uploaded_1" id="image_uploaded_1" value="" />
			<input type="hidden" name="image_uploaded_2" id="image_uploaded_2" value="" />
			<input type="hidden" name="image_uploaded_3" id="image_uploaded_3" value="" />
			
		</tbody>
	</table>



<?php  echo form_close();?>